'use strict';

const conn = require('../../libs/Conn');
const util = require('../../libs/Utils');

module.exports = async function (params) {
    let regionUpdateSql = ``;
    let updateObj = {
        engineering_name:params.eng_name,
        startDate:params.eng_startDate,
        structure_id:params.eng_structure_type,
        building_id:params.eng_building_use,
        region_id:params.eng_region_name,
        principal_id:params.eng_principal_id,
        status:params.eng_status,
};
let updateSql = `UPDATE engineering_file  SET ? WHERE engineering_id = ?;${regionUpdateSql}`;
await conn(updateSql, [updateObj, params.engineering_id]);
return {success: true};
};